package pers.kw.api;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import pers.kw.dto.UpdateAcctBalanceReqDto;
import pers.kw.protocol.R;

import javax.validation.Valid;
import java.math.BigDecimal;

public interface AccountApi {

    /**
     * 查询用户账户余额
     *
     * @param userNo
     * @return
     */
    @PostMapping(value = "/account/api/query/balance/{userNo}")
    R<BigDecimal> queryAcctBalance(@PathVariable(name = "userNo") String userNo);

    /**
     * 更新用户账余额
     *
     * @param reqDto
     * @return
     */
    @PostMapping(value = "/account/api/update/balance")
    R<String> updateAcctBalance(@Valid @RequestBody UpdateAcctBalanceReqDto reqDto);
}
